import hashlib
import json

from fastapi import APIRouter, Request, HTTPException
from fastapi.responses import StreamingResponse, JSONResponse


router = APIRouter(
    prefix='/admin/role',
    tags = ['角色管理']
)


@router.get("/menu")
async def rolw_menu():
    f = open('menu.json', 'r')
    menus = json.loads(f.read())
    data = { "code": 0, "message": "操作成功" }
    data["data"] = menus
    return JSONResponse(status_code=200, content=data)